import React from "react";

class PureTem extends React.PureComponent {
  state = {
    obj: {
      number: 0,
    },
  };
  handleClick = () => {
    const newObj = { ...this.state.obj, number: Math.floor(Math.random() * 3) };
    this.setState(() => {
      return {
        obj: newObj,
      };
    });
  };
  render() {
    return (
      <div>
        <h1>我是纯组件</h1>
      </div>
    );
  }
}
export default PureTem;
